package com.asset.pojo;

import com.asset.config.BigDecimalSerializer;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;
import org.apache.ibatis.annotations.One;
import tk.mybatis.mapper.annotation.KeySql;

import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 折旧记录
 * @author 11725
 */
@Data
@Table(name = "tab_asset_depreciation")
public class AssetDepreciation {

    /** 资产编号 */
    @Id
    private Long assetId;

    /** 折旧日期 */
    @Id
    @JsonFormat(pattern = "yyyy-MM-dd",  timezone="GMT+8")
    private Date deprDate;

    /** 折旧金额 */
    @JsonSerialize(using = BigDecimalSerializer.class)
    private BigDecimal deprAmount;

    private Asset asset;
}
